package com.ny.demo03;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        double money =50;
        System.out.println("你需要支付的金额为："+money);
        System.out.println("请选择你的支付方式：1.银行卡 2.支付宝 3.微信");
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        switch (i){
            case 1:
                Pay bankPay = new BankPay();
                bankPay.pay(money);
                break;
            case 2:
                Pay sPay = new SPay();
                sPay.pay(money);
                break;
            case 3:
                Pay wxPay = new WxPay();
                wxPay.pay(money);
                break;
        }
    }
}
